import * as types from '../actionType'
const initialState = {
    channels: [],
    results: [],
    page: 1,
    per_page: 10,
    total_count: 0
}


export default function article(state = initialState, action) {
    switch (action.type) {
        case types.SET_CHANNELS:
            return { ...state, channels: action.payload }
        case types.SET_ARTICLES:
            return { ...state, ...action.payload }

        default:
            return state
    }
}
